//
//  VMCTabButton.m
//  vmcshop
//
//  Created by bigknife on 14-10-9.
//  Copyright (c) 2014年 idongler. All rights reserved.
//

#import "VMCTabButton.h"

@implementation VMCTabButton

-(void)layoutSubviews {
    [super layoutSubviews];
    CGRect rect = self.imageView.frame;
    rect.origin.x = (CGRectGetWidth(self.frame) - CGRectGetWidth(self.imageView.frame))/2;
    rect.origin.y = 5;
    self.imageView.frame = rect;

    [self.titleLabel sizeToFit];
	self.titleLabel.textColor = self.selected?RGBA(92, 141, 71, 1.0):RGBA(172, 172, 172, 1.0);
    rect = self.titleLabel.frame;
    rect.origin.x = (CGRectGetWidth(self.frame) - CGRectGetWidth(self.titleLabel.frame))/2;
    rect.origin.y = CGRectGetHeight(self.frame) - CGRectGetHeight(self.titleLabel.frame);
    self.titleLabel.frame = rect;
    
}

@end
